package zap_learn

import (
	"go.uber.org/zap"
	"go.uber.org/zap/zapcore"
	"os"
)

func getEncoder() {
	zapcore.NewJSONEncoder(zap.NewProductionEncoderConfig())
	zapcore.NewConsoleEncoder(zap.NewDevelopmentEncoderConfig())
}

func getWriter() zapcore.WriteSyncer {
	file, _ := os.Create("./info.log")
	return zapcore.AddSync(file)
}
